]> dgit.raspbian.org Git - gnome-shell.git/commit
style: Stop using braces for single-line arrow functions
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 28 Jan 2019 00:42:00 +0000 (01:42 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Tue, 2 Jul 2019 12:17:46 +0000 (12:17 +0000)
commit14d7897a9335fe408e1b1728c789a8f34980a824
treee349d658a5469c74f83c7572c82a383121f64ef3
parent1398aa6562e9d8c682e0cfc66f8a60aad310d156
style: Stop using braces for single-line arrow functions

Braces are optional for single-line arrow functions, but there's a
subtle difference:
Without braces, the expression is implicitly used as return value; with
braces, the function returns nothing unless there's an explicit return.

We currently reflect that in our style by only omitting braces when the
function is expected to have a return value, but that's not very obvious,
not an important differentiation to make, and not easy to express in an
automatic rule.

So just omit braces consistently as mandated by gjs' coding style.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
39 files changed:
js/gdm/authPrompt.js
js/gdm/loginDialog.js
js/gdm/realmd.js
js/misc/ibusManager.js
js/misc/systemActions.js
js/misc/util.js
js/misc/weather.js
js/perf/hwtest.js
js/portalHelper/main.js
js/ui/accessDialog.js
js/ui/altTab.js
js/ui/appDisplay.js
js/ui/audioDeviceSelection.js
js/ui/calendar.js
js/ui/components/networkAgent.js
js/ui/ctrlAltTab.js
js/ui/dateMenu.js
js/ui/edgeDragAction.js
js/ui/iconGrid.js
js/ui/keyboard.js
js/ui/lookingGlass.js
js/ui/osdWindow.js
js/ui/padOsd.js
js/ui/panel.js
js/ui/panel.js. [new file with mode: 0644]
js/ui/popupMenu.js
js/ui/runDialog.js
js/ui/screenShield.js
js/ui/shellEntry.js
js/ui/shellMountOperation.js
js/ui/status/keyboard.js
js/ui/status/network.js
js/ui/status/system.js
js/ui/status/thunderbolt.js
js/ui/switcherPopup.js
js/ui/tweener.js
js/ui/windowAttentionHandler.js
js/ui/windowManager.js
js/ui/workspace.js